package de.g18.it0a.jlaser.nativ.menu;


public enum MainMenuEntry implements MenuEntry {

    EXIT("Beenden"),
    EDIT_ROOM("Raum bearbeiten"),
    FIND_SOLUTION("Spiegelpositionen berechnen");


    private final String text;


    private MainMenuEntry(String aText) {
        text = aText;
    }

    @Override
    public String getText() {
        return text;
    }

    @Override
    public int getOrdinal() {
        return ordinal();
    }

    public static MainMenuEntry getByOrdinal(int aOrdinal) {
        for (MainMenuEntry entry : values()) {
            if (entry.getOrdinal() == aOrdinal) {
                return entry;
            }
        }
        return null;
    }
}